package com.sinux.generality.basesupport.utils.kafka.serialization;

import java.util.Map;
import com.alibaba.fastjson.JSON;
import org.apache.kafka.common.serialization.Deserializer;

public class TransferObjectDeserializer implements Deserializer<TransferObject> {

    @Override
    public void configure(Map<String, ?> configs, boolean isKey) {
    }

    @Override
    public TransferObject deserialize(String topic, byte[] data) {
        return JSON.parseObject(data, TransferObject.class);
    }

    @Override
    public void close() {
    }
}
